# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=perl-file-sharedir
_pkgreal=File-ShareDir
pkgver=1.118
pkgrel=1
pkgdesc="Locate per-dist and per-module shared files"
url="https://metacpan.org/release/File-ShareDir/"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-class-inspector"
makedepends="perl-file-sharedir-install perl-inc-latest"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/R/RE/REHSACK/File-ShareDir-$pkgver.tar.gz"

builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
	make
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="890f33e96333f7b07707d722e59e7da9a287112062814ef294594ac67f2f7349f905c009e6cd70d3af3a4de85335b074ec5a61194f9b0495f3e793d6ca635853  File-ShareDir-1.118.tar.gz"
